Skip to content

fix: preserve Codex background delivery wakeups during worker exit - #2

Merged
reshuibuduo merged 1 commit into
mainfrom
codex/outbox-wakeup-handoff
Sep 5, 2026
Merged

fix: preserve Codex background delivery wakeups during worker exit#2
reshuibuduo merged 1 commit into
mainfrom
codex/outbox-wakeup-handoff

Conversation

@reshuibuduo

Copy link
Copy Markdown
Owner

Root cause

The post-merge Windows contract exposed a genuine outbox lost-wakeup race. A producer could enqueue a record while the drainer still owned its lock but had already decided to exit. Its wakeup marker was left behind, requiring another host event before delivery.

Fix

  • Producer rechecks the worker lock after writing its wakeup marker.
  • Worker releases its lock before the final wakeup check and retries ownership when requested.
  • Concurrent marker creation is idempotent.
  • Revert the earlier CI-only timeout increase; the original 8-second contract is retained.

Proof and validation

A deterministic child-process filesystem-gate test fails on the old code (0 !== 1) and passes both race interleavings with the fix. Repeated three times; 20 simultaneous producers tested. Full local Codex/Claude Code verification passes, along with transient-retry and terminal-failure regression tests. Refreshes the verified 235-entry Codex archive metadata.

The standalone Windows memory-backend ZIP, DSH tarball and generic MCPB are unchanged. Already published tags/assets are preserved. The standalone Codex release is still independently blocked by the documented official scanner false positives; this PR does not disable that gate.

@reshuibuduo
reshuibuduo merged commit 1a70fa1 into main Sep 5, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant